<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Document</title>
 </head>
 <body>
  
 </body>
</html>
<script>
	//函数返回值return

	function fun(a,b){
		//......
		return a+b;
	};
	//调用之后要得一个结果
	var haha = fun(3, 5);
	console.log(haha);
	console.log(fun(4,1));

	//一个函数里面只能有一个return
	function ha(){
		console.log(1);
		console.log(2);
		return '1234';
		console.log(3);
		console.log(4);
	};
	//return除了有返回值以外还有中断函数后面的程序
	console.log(ha());

	//做为一个参数
	function fn1(a, b){
		return a + b;
	};

	function fn2(a, b){
		return a + b;
	};

	//把fn1做为一个参数传给fn2
	console.log(fn2(3, fn1(3, 5)))
</script>
